/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

function restauraDadosDeBancas(element) {
    var xmlhttp;
    if (window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    else
    {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.open("GET", "/SisKepler_Gabriel/SolicitaDadosDeBanca?aluno=" + element, false);
    xmlhttp.send();

    var string = xmlhttp.responseText;
    var inputButton = document.getElementById("buttonConfig");

    if (string == "null" || string == "") {
        document.getElementById("membros").innerHTML = "não definido";
        inputButton.innerHTML = "<button id=\"buttonConfig\" class=\"btn-primary\" onclick=\"verificaCheckBoxs()\">Enviar Dados</button>";
        return;
    } else {
        document.getElementById("membros").innerHTML = string;
        inputButton.innerHTML = "<button id=\"buttonConfig\" class=\"btn\">Desabilitado</button>";
    }
}




